#ifndef OMG_DDS_PRIV_DDS_PRE_HPP_
#define OMG_DDS_PRIV_DDS_PRE_HPP_

/* Copyright (c) 2009-2010, Real-Time Innovations, Inc.
 * Copyright (c) 2010, Object Management Group, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * - Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 * - Neither the names of the above copyright holders nor the names of their
 *   contributors may be used to endorse or promote products derived from
 *   this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL A COPYRIGHT HOLDER OR CONTRIBUTOR BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/* Implementation-specific header for the OMG DDS.
 * The contents of this header are non-normative.
 */

#include <omg/dll.hpp>


// --- Compliance --- //
/* The following macros correspond to the compliance levels of the DDS
 * specification. Implementations fully implementing a given compliance
 * level shall define the corresponding macros to "FULL". Implementations
 * partially supporting a given compliance level shall define the
 * corresponding macro to "PARTIAL". Implementations with no support for a
 * given compliance level shall leave the corresponding macro undefined.
 */
#define OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT                FULL
#define OMG_DDS_PERSISTENCE_SUPPORT                         FULL
#define OMG_DDS_OWNERSHIP_SUPPORT                           FULL
#define OMG_DDS_OBJECT_MODEL_SUPPORT                        FULL
#define OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT   FULL


// --- Implementation Delegates --- //

class OMG_DDS_LOCAL Delegate
{
    // empty
};

#define OMG_DDS_BUILTIN_TOPIC_KEY_DELEGATE          ::Delegate
#define OMG_DDS_COHERENT_CHANGES_DELEGATE           ::Delegate
#define OMG_DDS_CONDITION_DELEGATE                  ::Delegate
#define OMG_DDS_DATA_READER_DELEGATE                ::Delegate
#define OMG_DDS_COHERENT_ACCESS_DELEGATE            ::Delegate
#define OMG_DDS_DATA_READER_QOS_DELEGATE            ::Delegate
#define OMG_DDS_DATA_WRITER_DELEGATE                ::Delegate
#define OMG_DDS_DATA_WRITER_QOS_DELEGATE            ::Delegate
#define OMG_DDS_DEADLINE_QOS_POLICY_DELEGATE        ::Delegate
#define OMG_DDS_DESTINATION_ORDER_QOS_POLICY_DELEGATE       ::Delegate
#define OMG_DDS_DOMAIN_PARTICIPANT_DELEGATE         ::Delegate
#define OMG_DDS_DOMAIN_PARTICIPANT_FACTORY_DELEGATE ::Delegate
#define OMG_DDS_DOMAIN_PARTICIPANT_FACTORY_QOS_DELEGATE     ::Delegate
#define OMG_DDS_DOMAIN_PARTICIPANT_QOS_DELEGATE     ::Delegate
#define OMG_DDS_DURABILITY_QOS_POLICY_DELEGATE      ::Delegate
#define OMG_DDS_DURATION_DELEGATE                   ::Delegate
#define OMG_DDS_ENTITY_DELEGATE                     ::Delegate
#define OMG_DDS_ENTITY_FACTORY_QOS_POLICY_DELEGATE  ::Delegate
#define OMG_DDS_GROUP_DATA_QOS_POLICY_DELEGATE      ::Delegate
#define OMG_DDS_GUARD_CONDITION_DELEGATE            ::Delegate
#define OMG_DDS_HISTORY_QOS_POLICY_DELEGATE         ::Delegate
#define OMG_DDS_INCONSISTENT_TOPIC_STATUS_DELEGATE  ::Delegate
#define OMG_DDS_INSTANCE_HANDLE_DELEGATE            ::Delegate
#define OMG_DDS_LATENCY_BUDGET_QOS_POLICY_DELEGATE  ::Delegate
#define OMG_DDS_LIFESPAN_QOS_POLICY_DELEGATE        ::Delegate
#define OMG_DDS_LIVELINESS_CHANGED_STATUS_DELEGATE  ::Delegate
#define OMG_DDS_LIVELINESS_LOST_STATUS_DELEGATE     ::Delegate
#define OMG_DDS_LIVELINESS_QOS_POLICY_DELEGATE      ::Delegate
#define OMG_DDS_LOANED_SAMPLES_DELEGATE             ::Delegate
#define OMG_DDS_LOANED_SAMPLES_ITERATOR_DELEGATE    ::Delegate
#define OMG_DDS_OFFERED_DEADLINE_MISSED_STATUS_DELEGATE     ::Delegate
#define OMG_DDS_OFFERED_INCOMPATIBLE_QOS_STATUS_DELEGATE    ::Delegate
#define OMG_DDS_OWNERSHIP_QOS_POLICY_DELEGATE       ::Delegate
#define OMG_DDS_OWNERSHIP_STRENGTH_QOS_POLICY_DELEGATE      ::Delegate
#define OMG_DDS_PARTICIPANT_BUILTIN_TOPIC_DATA_DELEGATE     ::Delegate
#define OMG_DDS_PARTITION_QOS_POLICY_DELEGATE       ::Delegate
#define OMG_DDS_PRESENTATION_QOS_POLICY_DELEGATE    ::Delegate
#define OMG_DDS_PUBLICATION_BUILTIN_TOPIC_DATA_DELEGATE     ::Delegate
#define OMG_DDS_PUBLICATION_MATCHED_STATUS_DELEGATE ::Delegate
#define OMG_DDS_PUBLISHER_DELEGATE                  ::Delegate
#define OMG_DDS_PUBLISHER_QOS_DELEGATE              ::Delegate
#define OMG_DDS_QOS_POLICY_COUNT_DELEGATE           ::Delegate
#define OMG_DDS_READ_CONDITION_DELEGATE             ::Delegate
#define OMG_DDS_READER_DATA_LIFECYCLE_QOS_POLICY_DELEGATE   ::Delegate
#define OMG_DDS_RELIABILITY_QOS_POLICY_DELEGATE     ::Delegate
#define OMG_DDS_REQUESTED_DEADLINE_MISSED_STATUS_DELEGATE   ::Delegate
#define OMG_DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS_DELEGATE  ::Delegate
#define OMG_DDS_RESOURCE_LIMITS_QOS_POLICY_DELEGATE ::Delegate
#define OMG_DDS_SAMPLE_DELEGATE                     ::Delegate
#define OMG_DDS_SAMPLE_LOST_STATUS_DELEGATE         ::Delegate
#define OMG_DDS_SAMPLE_REJECTED_STATUS_DELEGATE     ::Delegate
#define OMG_DDS_STATUS_CONDITION_DELEGATE           ::Delegate
#define OMG_DDS_SUBSCRIBER_DELEGATE                 ::Delegate
#define OMG_DDS_SUBSCRIBER_QOS_DELEGATE             ::Delegate
#define OMG_DDS_SUBSCRIPTION_BUILTIN_TOPIC_DATA_DELEGATE    ::Delegate
#define OMG_DDS_SUBSCRIPTION_MATCHED_STATUS_DELEGATE        ::Delegate
#define OMG_DDS_SUSPENDED_PUBLICATION_DELEGATE      ::Delegate
#define OMG_DDS_TIME_DELEGATE                       ::Delegate
#define OMG_DDS_TIME_BASED_FILTER_QOS_POLICY_DELEGATE       ::Delegate
#define OMG_DDS_TOPIC_BUILTIN_TOPIC_DATA_DELEGATE   ::Delegate
#define OMG_DDS_TOPIC_DATA_QOS_POLICY_DELEGATE      ::Delegate
#define OMG_DDS_TOPIC_DELEGATE                      ::Delegate
#define OMG_DDS_TOPIC_DESCRIPTION_DELEGATE          ::Delegate
#define OMG_DDS_TOPIC_QOS_DELEGATE                  ::Delegate
#define OMG_DDS_TRANSPORT_PRIORITY_QOS_POLICY_DELEGATE      ::Delegate
#define OMG_DDS_TYPE_SUPPORT_DELEGATE               ::Delegate
#define OMG_DDS_USER_DATA_QOS_POLICY_DELEGATE       ::Delegate
#define OMG_DDS_WAIT_SET_DELEGATE                   ::Delegate
#define OMG_DDS_WRITER_DATA_LIFECYCLE_QOS_POLICY_DELEGATE   ::Delegate

#ifdef OMG_DDS_PERSISTENCE_SUPPORT
  #define OMG_DDS_DURABILITY_SERVICE_QOS_POLICY_DELEGATE    ::Delegate
#endif // OMG_DDS_PERSISTENCE_SUPPORT

#ifdef OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
  #define OMG_DDS_CONTENT_FILTERED_TOPIC_DELEGATE   ::Delegate
  #define OMG_DDS_MULTI_TOPIC_DELEGATE              ::Delegate
  #define OMG_DDS_QUERY_CONDITION_DELEGATE          ::Delegate
#endif // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT

#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
#define OMG_DDS_ALIAS_TYPE_DELEGATE                 ::Delegate
#define OMG_DDS_ANNOTATION_DESCRIPTOR_DELEGATE      ::Delegate
#define OMG_DDS_ANNOTATION_MEMBER_DELEGATE          ::Delegate
#define OMG_DDS_ANNOTATION_MEMBER_VALUE_DELEGATE    ::Delegate
#define OMG_DDS_ANNOTATION_TYPE_DELEGATE            ::Delegate
#define OMG_DDS_ANNOTATION_USAGE_MEMBER_DELEGATE    ::Delegate
#define OMG_DDS_ANNOTATION_USAGE_DELEGATE           ::Delegate
#define OMG_DDS_ARRAY_TYPE_DELEGATE                 ::Delegate
#define OMG_DDS_BIT_DELEGATE                        ::Delegate
#define OMG_DDS_BIT_SET_TYPE_DELEGATE               ::Delegate
#define OMG_DDS_DATA_REPRESENTATION_QOS_POLICY_DELEGATE     ::Delegate
#define OMG_DDS_DYNAMIC_DATA_DELEGATE               ::Delegate
#define OMG_DDS_DYNAMIC_DATA_FACTORY_DELEGATE       ::Delegate
#define OMG_DDS_DYNAMIC_DATA_MEMBER_DESCRIPTOR_ITERATOR_DELEGATE    ::Delegate
#define OMG_DDS_DYNAMIC_TYPE_DELEGATE               ::Delegate
#define OMG_DDS_DYNAMIC_TYPE_FACTORY_DELEGATE       ::Delegate
#define OMG_DDS_DYNAMIC_TYPE_MEMBER_DELEGATE        ::Delegate
#define OMG_DDS_ENUMERATED_CONSTANT_DELEGATE        ::Delegate
#define OMG_DDS_ENUMERATION_TYPE_DELEGATE           ::Delegate
#define OMG_DDS_KEYED_BYTES_DELEGATE                ::Delegate
#define OMG_DDS_KEYED_STRING_DELEGATE               ::Delegate
#define OMG_DDS_MAP_TYPE_DELEGATE                   ::Delegate
#define OMG_DDS_MEMBER_DESCRIPTOR_DELEGATE          ::Delegate
#define OMG_DDS_MEMBER_PROPERTY_DELEGATE            ::Delegate
#define OMG_DDS_MODULE_DELEGATE                     ::Delegate
#define OMG_DDS_SEQUENCE_TYPE_DELEGATE              ::Delegate
#define OMG_DDS_STRING_TYPE_DELEGATE                ::Delegate
#define OMG_DDS_STRUCTURE_MEMBER_DELEGATE           ::Delegate
#define OMG_DDS_STRUCTURE_TYPE_DELEGATE             ::Delegate
#define OMG_DDS_TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_DELEGATE    ::Delegate
#define OMG_DDS_TYPE_DESCRIPTOR_DELEGATE            ::Delegate
#define OMG_DDS_TYPE_LIBRARY_DELEGATE               ::Delegate
#define OMG_DDS_TYPE_LIBRARY_ELEMENT_DELEGATE       ::Delegate
#define OMG_DDS_TYPE_OBJECT_DELEGATE                ::Delegate
#define OMG_DDS_TYPE_PROPERTY_DELEGATE              ::Delegate
#define OMG_DDS_UNION_MEMBER_DELEGATE               ::Delegate
#define OMG_DDS_UNION_TYPE_DELEGATE                 ::Delegate
#endif  // OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT


// --- Primitive Types --- //
#ifndef NO_C99

/* The target C++ compiler supports the header file stdint.h from the C99
 * standard library. Include it to introduce definitions for int32_t and
 * other similar types.
 */ 
#include <stdint.h>

/* The "long double" primitive type is supported as part of the language.
 * Use that definition directly.
 */
typedef long double ldouble_t;

#else

/* The target C++ compiler does not support the header file stdint.h from the
 * C99 standard library. Provide alternative definitions for the types in that
 * header, if appropriate.
 */
// TODO

/* The "long double" primitive type may not be supported by the compiler.
 * Emulate it.
 */
// TODO

#endif


#endif // !defined(OMG_DDS_PRIV_DDS_PRE_HPP_)
